package com.nop.mdp.beans;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;

@Entity
@Table(name = "mdp_users_sites")
public class MdpUsersSites
{
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	private Integer		mdp_user_site_id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "mdp_user_id", nullable = false)
	@OnDelete(action = OnDeleteAction.NO_ACTION)
	private MdpUsers	mdpUsers;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "mdp_site_id", nullable = false)
	@OnDelete(action = OnDeleteAction.NO_ACTION)
	private MdpSites	mdpSites;
	
	public Integer getMdp_user_site_id()
	{
		return this.mdp_user_site_id;
	}
	
	public void setMdp_user_site_id( Integer mdpUserSiteId )
	{
		this.mdp_user_site_id = mdpUserSiteId;
	}
	
	public MdpUsers getMdpUsers()
	{
		return this.mdpUsers;
	}
	
	public void setMdpUsers( MdpUsers mdpUsers )
	{
		this.mdpUsers = mdpUsers;
	}
	
	public MdpSites getMdpSites()
	{
		return this.mdpSites;
	}
	
	public void setMdpSites( MdpSites mdpSites )
	{
		this.mdpSites = mdpSites;
	}
	
}
